﻿using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using NativeCode.Core.Data;

namespace NativeCode.Web.Controls.Data
{
	public class CheckBoxListQuery : LambdaQuery
	{
		public CheckBoxListQuery()
		{
		}

		public CheckBoxListQuery(IEnumerable<CheckBox> checkBoxes)
		{
			CheckBoxes = checkBoxes;
		}

		public IEnumerable<CheckBox> CheckBoxes { get; private set; }

		public IEnumerable<CheckBox> SelectedCheckBoxes
		{
			get { return CheckBoxes.Where(cb => cb.Checked); }
		}
	}
}